﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class reports_DetailReports : System.Web.UI.Page
{

    public string RollupTitle;

    public Addresses Addrs;
 
    protected void Page_Load(object sender, EventArgs e)
    {
        RollupTitle = Session["RollupTitle"].ToString();
        Addrs = new Addresses();
        Addrs.LoadAddressList(ref grvAddressList, Session["TRAC_ID"].ToString());
    }

    protected void AddressList_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        System.Web.UI.WebControls.WebControl lbl = (System.Web.UI.WebControls.WebControl)(e.Row.Cells[0].FindControl("lblAddr"));
        if (lbl != null)
        {
            System.Drawing.Color bc = lbl.BackColor;
            Addrs.CountBlue += bc == System.Drawing.ColorTranslator.FromHtml("#47CAFF") ? 1 : 0;
            Addrs.CountGreen += bc == System.Drawing.ColorTranslator.FromHtml("#a4f368") ? 1 : 0;
            Addrs.CountWhite += bc == System.Drawing.ColorTranslator.FromHtml("#FFFFFF") ? 1 : 0;
        }
    }

}